package com.huimingpay.merchant.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * 
 * @TableName store
 */
@TableName(value ="store")
public class Store implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 门店名称
     */
    private String storeName;

    /**
     * 门店编号
     */
    private Long storeNumber;

    /**
     * 所属商户
     */
    private Long merchantId;

    /**
     * 父门店
     */
    private Long parentId;

    /**
     * 0表示禁用，1表示启用
     */
    private Boolean storeStatus;

    /**
     * 门店地址
     */
    private String storeAddress;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 门店名称
     */
    public String getStoreName() {
        return storeName;
    }

    /**
     * 门店名称
     */
    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * 门店编号
     */
    public Long getStoreNumber() {
        return storeNumber;
    }

    /**
     * 门店编号
     */
    public void setStoreNumber(Long storeNumber) {
        this.storeNumber = storeNumber;
    }

    /**
     * 所属商户
     */
    public Long getMerchantId() {
        return merchantId;
    }

    /**
     * 所属商户
     */
    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * 父门店
     */
    public Long getParentId() {
        return parentId;
    }

    /**
     * 父门店
     */
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    /**
     * 0表示禁用，1表示启用
     */
    public Boolean getStoreStatus() {
        return storeStatus;
    }

    /**
     * 0表示禁用，1表示启用
     */
    public void setStoreStatus(Boolean storeStatus) {
        this.storeStatus = storeStatus;
    }

    /**
     * 门店地址
     */
    public String getStoreAddress() {
        return storeAddress;
    }

    /**
     * 门店地址
     */
    public void setStoreAddress(String storeAddress) {
        this.storeAddress = storeAddress;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Store other = (Store) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
            && (this.getStoreNumber() == null ? other.getStoreNumber() == null : this.getStoreNumber().equals(other.getStoreNumber()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getStoreStatus() == null ? other.getStoreStatus() == null : this.getStoreStatus().equals(other.getStoreStatus()))
            && (this.getStoreAddress() == null ? other.getStoreAddress() == null : this.getStoreAddress().equals(other.getStoreAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getStoreNumber() == null) ? 0 : getStoreNumber().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getStoreStatus() == null) ? 0 : getStoreStatus().hashCode());
        result = prime * result + ((getStoreAddress() == null) ? 0 : getStoreAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", storeName=").append(storeName);
        sb.append(", storeNumber=").append(storeNumber);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", parentId=").append(parentId);
        sb.append(", storeStatus=").append(storeStatus);
        sb.append(", storeAddress=").append(storeAddress);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}